{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/tags/index')}">标签管理</a></li>
            <li class="layui-this">修改标签</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/tags/update')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">上级栏目</label>
                        <div class="layui-input-block">

                            <select name="pid" lay-verify="required">
                                <option value="0">一级栏目</option>
                                {foreach name="tags_level_list" item="vo"}
                                {if condition="$vo.pid==0"}
                                <option value="{$vo.id}" {if condition="$tags.pid==$vo.id"} selected="selected"{/if} >PID:{$vo.pid}  {$vo.name} </option>
                                {/if}>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">公众号id</label>
                        <div class="layui-input-block">
                            <select name="auid" lay-verify="required">
                                <option value="0">通用标签</option>
                                {foreach name="weixins" item="vo"}
                                <option value="{$vo.id}" {if condition="$tags.auid==$vo.id"} selected="selected"{/if}  > {$vo.wxname} </option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">标签内容</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" value="{$tags.name}" placeholder="请输入标签内容" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标签id</label>
                        <div class="layui-input-block">
                            <input type="text" name="group_id" value="{$tags.group_id}" placeholder="标签id" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="text" name="sort" value="{$tags.sort}" required  lay-verify="required" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$tags.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/kindeditor/kindeditor.config.js"></script>
<script src="__JS__/kindeditor/kindeditor-all-min.js"></script>
{/block}
{block name="script"}
<script>
    KindEditor.ready(function(K) {
        K.create('#content', KindEditorOptions);
    });
</script>
{/block}